<h2><%= @user.username %>'s Friends</h2>

<table>
  <% if is_logged_in? and logged_in_user == @user %>
    <%= render :partial => 'friendship_with_edit', :collection=>@user.friendships %>
  <% else %>
    <%= render :partial => 'friendship', :collection => @user.friendships %>
  <% end %>
</table>